<!DOCTYPE html>
<html lang="en-us">
<head>
	<meta charset="utf-8">
	<!--<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">-->

	<title> 车辆轨迹回放 </title>
	<meta name="description" content="">
	<meta name="author" content="">

	<!-- Use the correct meta names below for your web application
		 Ref: http://davidbcalhoun.com/2010/viewport-metatag 
		 
	<meta name="HandheldFriendly" content="True">
	<meta name="MobileOptimized" content="320">-->
	
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

	<!-- Basic Styles -->
	<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" media="screen" href="css/font-awesome.min.css">

	<!-- SmartAdmin Styles : Please note (smartadmin-production.css) was created using LESS variables -->
	<link rel="stylesheet" type="text/css" media="screen" href="css/smartadmin-production.css">
	<link rel="stylesheet" type="text/css" media="screen" href="css/smartadmin-skins.css">
    
	<!-- G7 fix -->
	<link rel="stylesheet" type="text/css" media="screen" href="css/demo-increase.css">
    
	<!-- SmartAdmin RTL Support is under construction
	<link rel="stylesheet" type="text/css" media="screen" href="css/smartadmin-rtl.css"> -->
	<!-- daterangepicker Styles  -->
	<link rel="stylesheet" type="text/css" media="screen" href="css/daterangepicker-bs3.css">
	<link rel="stylesheet" type="text/css" media="screen" href="css/demo.css">
	<!--<link rel="stylesheet" type="text/css" media="screen" href="js/plugin/splite/split-pane.css"> -->
	<!-- FAVICONS -->
	<link rel="shortcut icon" href="img/favicon/favicon.ico" type="image/x-icon">
	<link rel="icon" href="img/favicon/favicon.ico" type="image/x-icon">
	
	<style type="text/css">
	
		td.td_time {
			width : 150px;
		}
	
	</style>
	
	

</head>
<body>
<section id="widget-grid" class="">
	<!-- row -->
	<div class="row" id="allTaskBox">
		<!-- NEW WIDGET START -->
			<article class="col-xs-12 col-sm-12 col-md-12 col-lg-12" >
				<!-- Widget ID (each widget will need unique ID)-->
				<div class="jarviswidget jarviswidget-color-blueLight" id="wid-id-0" data-widget-sortable="true" data-widget-colorbutton="false" data-widget-editbutton="false" data-widget-togglebutton="false" data-widget-deletebutton="false" style="min-height:500px">
					<header>
						<span class="widget-icon"> <i class="fa fa-table"></i> </span>
						<h2> imei列表 </h2>
					</header>
					<!-- widget div-->
					<div role="content">
						<!-- widget edit box -->
						<div class="jarviswidget-editbox">
							<!-- This area used as dropdown edit box -->
						</div>
						<!-- end widget edit box -->
						<!-- widget content -->
						<div class="widget-body no-padding">
							<!-- 自定义搜索区 -->
							<div class="widget-body-toolbar" style="height:70px;overflow:hidden;">
								<form role="form" class="smart-form">
									<div class="pull-left global-search-box">
										<section class="pull-left no-padding col pull-width160">
											<label class="">类名</label>
											
											<label class="input">
												<input type="text" id="classname" value="" name="tid" placeholder="" class="input-sm">
											</label>
										</section>
										
										<section class="pull-left no-padding col pull-width160">
											<label class="">startrowkey</label>
											
											<label class="input">
												<input type="text" id="start" value="" name="tid" placeholder="" class="input-sm">
											</label>
										</section>
										
										<section class="pull-left no-padding col pull-width160">
											<label class="">endrowkey</label>
											
											<label class="input">
												<input type="text" id="end" value="" name="tid" placeholder="" class="input-sm">
											</label>
										</section>
											
										<div class="global-search-btn" >
											<a class="btn btn-primary  btn-sm" id="doSearch" type="button">搜索</a>
											<img id="loading"  alt="" src="img/loading2.gif" style="margin-top: 17px;display: none;">
								  		</div>
									</div>
									
								</form>
							</div>

							<table id="dt_basic" class="table table-striped table-bordered table-hover has-tickbox">
								<thead id="thead">
								</thead>
								<tbody id="tbody">
								</tbody>
							</table>

							<div class="dt-row dt-bottom-row">
								<div class="row">
									<div class="col-sm-1">
										<div id="dt_basic_length" class="dataTables_length">
											<span class="smart-form"> <label class="select"
												style="width: 60px"> 
												<select size="1" id="dt_row" name="dt_basic_length" aria-controls="dt_basic">
														<option value="10" selected="selected">10</option>
														<option value="25">25</option>
														<option value="50">50</option>
												</select> <i> </i>
											</label>
											</span>
										</div>
									</div>
									
									<div class="col-sm-4">
										<div class="dataTables_info" id="dt_basic_info">
										
										</div>
									</div>
									<div class="col-sm-7 text-right">
										<div class="dataTables_paginate paging_bootstrap_full">
											<ul class="pagination">
												<li class="prev"><a href="#">前一页</a></li>
												<li class="next"><a href="#">后一页</a></li>
												<!-- <li class="first disabled"><a href="#">首页</a></li>
												<li class="prev disabled"><a href="#">前一页</a></li>
												<li value=1><a href="#">1</a></li>
												<li class="active" value=2><a href="#">2</a></li>
												<li class="next disabled"><a href="#">后一页</a></li>
												<li class="last disabled"><a href="#">尾页</a></li> -->
											</ul>
										</div>
									</div>
								</div>
							</div>


						</div>
						<!-- end widget content -->
					</div>
					<!-- end widget div -->

				</div>
				<!-- end widget -->
			</article>
		<!-- WIDGET END -->

	</div>

	<!-- end row -->

	<!-- end row -->

</section>
<!-- end widget grid -->
<!--================================================== -->

	<!-- PACE LOADER - turn this on if you want ajax loading to show (caution: uses lots of memory on iDevices)
	<script data-pace-options='{ "restartOnRequestAfter": true }' src="../../js/plugin/pace/pace.min.js"></script>-->

	<!-- Link to Google CDN's jQuery + jQueryUI; fall back to local -->
	<script src="js/libs/jquery-2.0.2.min.js"></script>
	<script>
		if (!window.jQuery) {
			document.write('<script src="js/libs/jquery-2.0.2.min.js"><\/script>');
		}
	</script>

	<script src="js/libs/jquery-ui-1.10.3.min.js"></script>
	<script>
		if (!window.jQuery.ui) {
			document.write('<script src="js/libs/jquery-ui-1.10.3.min.js"><\/script>');
		}
	</script>

	<!-- JS TOUCH : include this plugin for mobile drag / drop touch events
	<script src="../js/plugin/jquery-touch/jquery.ui.touch-punch.min.js"></script> -->

	<!-- BOOTSTRAP JS -->
	<script src="js/bootstrap/bootstrap.min.js"></script>

	<!-- CUSTOM NOTIFICATION -->
	<script src="js/notification/SmartNotification.min.js"></script>

	<!-- JARVIS WIDGETS -->
	<script src="js/smartwidgets/jarvis.widget.min.js"></script>

	<!-- EASY PIE CHARTS -->
	<script src="js/plugin/easy-pie-chart/jquery.easy-pie-chart.min.js"></script>

	<!-- SPARKLINES -->
	<script src="js/plugin/sparkline/jquery.sparkline.min.js"></script>

	<!-- JQUERY VALIDATE -->
	<script src="js/plugin/jquery-validate/jquery.validate.min.js"></script>
	<script src="js/plugin/jquery-validate/localization/messages_zh.js"></script>
	
	<!-- JQUERY MASKED INPUT -->
	<script src="js/plugin/masked-input/jquery.maskedinput.min.js"></script>

	<!-- JQUERY UI + Bootstrap Slider -->
	<script src="js/plugin/bootstrap-slider/bootstrap-slider.min.js"></script>

	<!-- browser msie issue fix -->
	<script src="js/plugin/msie-fix/jquery.mb.browser.min.js"></script>

	<!-- SmartClick: For mobile devices -->
	<script src="js/plugin/smartclick/smartclick.js"></script>

	<script src="js/plugin/splite/split-pane.js"></script>

	<!--<script src="../js/plugin/date/moment.js"></script> -->
	<script src="js/plugin/date/daterangepicker.js"></script>

	<!-- JQUERY SELECT2 INPUT -->
	<script src="js/plugin/select2/select2.min.js"></script>


	<!--[if IE 8]>

	<h1>你的浏览器版本太低，为了您正常使用本系统，请到此处升级浏览器版本 www.microsoft.com/download</h1>

	<![endif]-->

	<!-- Demo purpose only -->
	<script src="js/demo.js"></script>
	<script src="js/common.js"></script>

	<!-- MAIN APP JS FILE -->
	<script src="js/app.js"></script>

	<script type="text/javascript" src="js/plugin/iresizer/iframeResizer.contentWindow.min.js"></script> 

<script src="js/plugin/date/moment.js"></script>
<script src="js/plugin/date/daterangepicker.js"></script>

<script type="text/javascript">

	// DO NOT REMOVE : GLOBAL FUNCTIONS!
	pageSetUp();

	//var aoColumns = [];//暂时先作为全局变量，想办法作为参数传递给runDataTables
	var toPage = 1;
	var totalPage = 1;
	doSearch();
 	function doSearch(){
 		$("#doSearch").click(function () {
 			searchBy();
 			$(".prev").click(function () {
 	 			//mark
 	 			if (toPage > 1){
 	 				toPage--;
 	 				searchBy();
 	 			}
 	 		});
 			$(".next").click(function () {
 				if (toPage < totalPage){
 					toPage++;
 					searchBy();
 				}
 			 });
 			$("#dt_row").change(function () {
 				searchBy();
 			});
 		})
	} 
 	
 	/* initTable();
 	//初始化表格
 	function initTable() {
 		searchBy();
 	} */
	
	function searchBy(){
		$('#loading').show();
		var searchString = $('#classname').val();
		
		var pageSize = $('#dt_row').val();
		var start = $('#start').val();
		var end = $('#end').val();
		$.ajax({
					
				  	url: "/smarttest-frontstage/hbase/readData.action?class="+searchString+
				  			"&pageSize="+pageSize+"&pageNo="+toPage+"&start="+start+"&end="+end,
				  	dataType : 'json',
				  	method:'GET',
				  	success: function(data){
				  		var item = data;
				  		var tdHtml = '';
				  		var thHtml='';
				  		
				  		var total = item["total"];
				  		var pageNum = parseInt(total/pageSize);
				  		if (total%pageSize != 0){
				  			pageNum++;
				  		}
				  		totalPage = pageNum;
				  		var infoHtml = '当前第 '+toPage+'/'+pageNum+' 页';
				  		
				  		for (msg of item["rows"]){
				  			tdHtml += '<tr>';
				  			thHtml = '';
				  			thHtml += '<tr>';
				  			$.each(msg, function(k, v){
				  				var nk = k;
				  				var nv = v;
				  				thHtml += '<td>'+k+'</td>';
					  			tdHtml += '<td>'+v+'</td>';
					  			/* tdHtml += '<td class="td_send">'+msg['orgcode']+'</ td>'; */
				  			});
				  			tdHtml += '</tr>';
				  			thHtml += '</tr>';
				  			/* tdHtml += '<tr>';
				  			tdHtml += '<td class="td_time">'+msg['imei']+'</ td>';
				  			tdHtml += '<td class="td_send">'+msg['orgcode']+'</ td>';
				  			tdHtml += '</tr>'; */
				  		}
				  		$('.dataTables_info').html('');
				  		$('.dataTables_info').html(infoHtml);
				  		
				  		$('#thead').html('');
				  		$('#thead').append(thHtml);
				  		
				  		$('#tbody').html('');
				  		$('#tbody').append(tdHtml);
				  		
				  		$('#loading').hide();
				  	}
				});
	}
	
	function hideTaskMenu(){
		$('#chat-container').removeClass('open');
	}

	function showLastTaskMenu(){
		$("#btnToggleCom").next().next("dl").toggle();
		$("#btnToggleCom").children("i").toggleClass("fa-minus-circle fa-plus-circle");
	}

	//控制iframe全屏
	$("a.jarviswidget-fullscreen-btn").bind("click",function(){
		parent.iframeFullScreen();
		//return false;
	})
</script>
</body>

</html>


